package com.healthcloud.service.patient.impl;

import com.healthcloud.dao.patient.BoneLooseResultDao;
import com.healthcloud.entity.patient.BoneLooseResultEntity;
import com.healthcloud.service.patient.BoneLooseResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

import com.healthcloud.utils.PageParam;
import org.springframework.transaction.annotation.Transactional;


@Service("boneLooseResultService")
@Transactional
class BoneLooseResultServiceImpl implements BoneLooseResultService {
	@Autowired
	private BoneLooseResultDao boneLooseResultDao;
	
	@Override
	public BoneLooseResultEntity queryObject(Integer id){
		return boneLooseResultDao.queryObject(id);
	}
	
	@Override
	public List<BoneLooseResultEntity> queryList(BoneLooseResultEntity bean, PageParam pageParam){
		return boneLooseResultDao.queryList(bean, pageParam);
	}
	
	@Override
	public int queryTotal(BoneLooseResultEntity bean){
		return boneLooseResultDao.queryTotal(bean);
	}
	
	@Override
	public void save(BoneLooseResultEntity boneLooseResult){
		boneLooseResultDao.save(boneLooseResult);
	}
	
	@Override
	public void update(BoneLooseResultEntity boneLooseResult){
		boneLooseResultDao.update(boneLooseResult);
	}
	
	@Override
	public void delete(Integer id){
		boneLooseResultDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		boneLooseResultDao.deleteBatch(ids);
	}

	@Override
	public void saveOrUpdate(BoneLooseResultEntity entity) {
		if (entity.getId()==null){
			boneLooseResultDao.save(entity);
		}else {
			boneLooseResultDao.update(entity);
		}
	}

	@Override
	public BoneLooseResultEntity queryOne(BoneLooseResultEntity entity) {
		return boneLooseResultDao.queryOne(entity);
	}

}
